package com.ruoyi.project.channel.incomeInfo.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.channel.incomeInfo.mapper.IncomeInfoMapper;
import com.ruoyi.project.channel.incomeInfo.domain.IncomeInfo;
import com.ruoyi.project.channel.incomeInfo.service.IIncomeInfoService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 佣金 服务层实现
 * 
 * @author CAIN
 * @date 2021-02-04
 */
@Service
public class IncomeInfoServiceImpl implements IIncomeInfoService 
{
	@Autowired
	private IncomeInfoMapper incomeInfoMapper;

	/**
     * 查询佣金信息
     * 
     * @param incomeId 佣金ID
     * @return 佣金信息
     */
    @Override
	public IncomeInfo selectIncomeInfoById(Long incomeId)
	{
	    return incomeInfoMapper.selectIncomeInfoById(incomeId);
	}
	
	/**
     * 查询佣金列表
     * 
     * @param incomeInfo 佣金信息
     * @return 佣金集合
     */
	@Override
	public List<IncomeInfo> selectIncomeInfoList(IncomeInfo incomeInfo)
	{
	    return incomeInfoMapper.selectIncomeInfoList(incomeInfo);
	}
	
    /**
     * 新增佣金
     * 
     * @param incomeInfo 佣金信息
     * @return 结果
     */
	@Override
	public int insertIncomeInfo(IncomeInfo incomeInfo)
	{
	    return incomeInfoMapper.insertIncomeInfo(incomeInfo);
	}
	
	/**
     * 修改佣金
     * 
     * @param incomeInfo 佣金信息
     * @return 结果
     */
	@Override
	public int updateIncomeInfo(IncomeInfo incomeInfo)
	{
	    return incomeInfoMapper.updateIncomeInfo(incomeInfo);
	}

	/**
     * 删除佣金对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteIncomeInfoByIds(String ids)
	{
		return incomeInfoMapper.deleteIncomeInfoByIds(Convert.toStrArray(ids));
	}
	
}
